
const moment = require('moment')
// const time = moment('2021-07-29 15:55:00');
// console.log(time);
const str1 = '2021-07-29 15:55:00.0';
const str2 = 'YYYY-MM-DD HH:mm:ss.S';
const boolean = true

function time(...args) {
  const times = moment(...args);
  console.log(times.isValid());
}

time(str1, str2, boolean);

